package com.hxkj.dao.impl;

import com.hxkj.dao.NavigationDao;
import com.hxkj.mapper.NavigationMapper;
import com.hxkj.domain.po.Navigation;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;


/**
* 数据操作实现
*
* @author: chenwei
* @version: 1.0
* @datetime: 2018-06-05 19:32:55
*
*/
@Service("navigationDao")
public class NavigationDaoImpl implements NavigationDao {

    @Resource
    private NavigationMapper navigationMapper;

    @Override
    public Navigation get(Long navigationId) {
        return navigationMapper.selectByPrimaryKey(navigationId);
    }

    @Override
    public List<Navigation> get(Navigation navigation) {
        return navigationMapper.select(navigation);
    }

    @Override
    public int delete(Long navigationId) {
        return navigationMapper.deleteByPrimaryKey(navigationId);
    }

    @Override
    public int delete(Navigation navigation) {
        return navigationMapper.delete(navigation);
    }

    @Override
    public int save(Navigation navigation) {
        return navigationMapper.insert(navigation);
    }

    @Override
    public int update(Navigation navigation) {
        return navigationMapper.update(navigation);
    }

    @Override
    public Navigation selectNavigationName(Navigation navigation) {
        return navigationMapper.selectNavigationName(navigation);
    }

    @Override
    public int saveNavigation(Navigation navigation) {
        return navigationMapper.saveNavigation(navigation);
    }

    @Override
    public int selectNavigationByColumn(Navigation navigation) {
        return navigationMapper.selectNavigationByColumn(navigation);
    }
}
